Skip to content

Change License of gem from GPL 3.0 to dual-license GPL-3.0-or-later OR BSD-2-Clause - #154

Open
tmaier wants to merge 4 commits into
masterfrom
tmaier-dual-license
Open

tmaier wants to merge 4 commits into
masterfrom
tmaier-dual-license

Conversation

@tmaier

@tmaier tmaier commented Apr 22, 2022 •

Copy link
Copy Markdown
Collaborator

Currently, the gem is only available under the terms and conditions of GPL 3.0.

This is quite restrictive, as one could not use the gem within a proprietary software.

This is why I am proposing to dual-license the gem under GPL-3.0-or-later OR BSD-2-Clause (SPDX: GPL-3.0-or-later OR BSD-2-Clause), at the user's option.

For this to happen, every past contributor must accept this license change.

I would like to ask every contributor to state their support for this license change in this Pull Request.
Simply post "I consent to the license change proposed"

This PR serves as the public record of the relicensing: consents, outreach attempts and decisions are documented here.

Consent tracker

Based on https://github.com/inukshuk/bibtex-ruby/graphs/contributors, cross-checked against the full git history (git shortlog -sne), including commit authors without a linked GitHub account (audit of 2026-11-14).

Not contributors of code: dependabot[bot] (version bumps only). The "thanks to @…" entries in History.txt for @jwvdm, @ashinkarov, @jrochkind and @noahdesu credit bug reports, not code.

Outreach log

Date Contributor(s) Channel Result
2022-04-22 all contributors listed above @mention in this PR most consents received in 2022
2023-10-28 @teoric, @houshuang, @mfenner, @steffengodskesen direct email + @mention in this PR all four consented here (2023-10-28 to 2023-11-01). @steffengodskesen also consented by email; no email reply from @houshuang
2023-10-28 @frau-sma, @retrography, @skalee @mention in this PR (no email address known at the time) @retrography consented
2024-01-17 @frau-sma @mention in this PR no reply
2026-11-14 @JLimperg, @a-fent @mention in this PR, deadline 2026-11-30 pending
2026-11-14 @JLimperg, @a-fent, @frau-sma, @skalee direct email (addresses from commit metadata and personal websites), deadline 2026-11-30 pending
2026-11-14 Frank Fischer direct email to the 2011 commit address and a current address (identity via public commits, unconfirmed), deadline 2026-11-30 replied by email the same day from the current address: did not consent and asked for all of his changes to be rewritten. Rewritten in #201

Assessment of contributions without consent

Contributor Contribution Status in current code Decision
@skalee fa95f86 (#146): Travis CI matrix, Gemfile.lock, rexml runtime dependency in gemspec .travis.yml was deleted, the gemspec line was removed in b002b79, and Gemfile.lock was regenerated since Not present. No consent needed
@frau-sma c216241: removes redundant words from one README sentence ("…are wrapped") Present De minimis. Pure typo fix, no creative expression
Frank Fischer bfaa188, 8eb3979, 7778f42 (2011): .to_s before .match for dynamic field writers, / added to the lexer's name pattern, File.open instead of File.write in save_to Removed in #201 Did not consent: rewritten. #201 removes his code and reimplements the behaviour clean-room from a written specification; an independent review found no reproduced code
@a-fent 8773c95 (#107): adds one journaltitle → container-title mapping and one :report type check Present Pending until 2026-11-30, then de minimis (2 lines of factual mapping). Rewrite if in doubt
@JLimperg #40, #47, #57: 6 commits, ~80 lines (multiline values feature, Entry#dup fix, @comment/@preamble parsing, Value.create) To be checked Pending until 2026-11-30, then rewrite whatever remains

Provenance of non-contributor material

Checked on 2026-11-14. We searched the repository for copied or third-party material (copyright and license notices, "adapted from" or "taken from" comments, vendored files, generated code, fixtures).

Material Origin Assessment
lib/bibtex/parser.rb, lib/bibtex/name_parser.rb Generated by Racc from the project's own grammars bibtex.y and names.y Derived only from project code. Racc's runtime is a separate gem dependency (require 'racc/parser.rb') and is not embedded. OK
test/fixtures/decoret.bib Examples from Xavier Décoret's tutorial "A summary of BibTeX" Short bibliographic records used as test data. Factual metadata, not creative expression. OK
features/issues/slash_keys.feature One entry taken from DBLP DBLP data is released under CC0. OK
Other .bib fixtures and feature files (e.g. bibdesk.bib, latex_filter.feature) Bibliographic records of real publications, written by contributors or exported with BibDesk Factual metadata. OK
Runtime dependencies (latex-decode, racc, …) Separate gems Not part of this code base; their own licenses apply. Not affected

No third-party source code was found in the repository.

Playbook if consent is not given

We ask every contributor whose code is still in the code base. We document each attempt (PR mention, email to the commit address) with its date and give a clear deadline. Silence is not treated as consent. If no consent is given by the deadline, or a contributor objects, each remaining contribution falls into one of two categories:

  1. De minimis: no action needed. The contribution is not copyrightable because it has no creative expression. Examples are typo fixes, one-line mechanical fixes, version or dependency bumps, and purely factual mappings. A contribution that no longer exists in the current code base also needs no consent. We document the reasoning per contribution in the table above.
  2. Rewrite: remove and reimplement. For any substantial contribution that is still present, we remove the code and reimplement the functionality from the issue or behaviour description and the tests, not from the original code. Ideally a maintainer who has not worked with that code does the rewrite. Each rewrite is a separate commit that references this PR, and we list it in the table above.

The license change only applies to releases published after this PR is merged. All earlier releases remain under GPL-3.0-or-later.

@tmaier

tmaier commented Apr 22, 2022

Copy link
Copy Markdown
Collaborator Author

I consent to the license change proposed

5 similar comments
@cruessler

Copy link
Copy Markdown
Contributor

I consent to the license change proposed

@sharnik

sharnik commented Apr 22, 2022

Copy link
Copy Markdown
Contributor

I consent to the license change proposed

@temporaer

Copy link
Copy Markdown
Contributor

I consent to the license change proposed

@andriusvelykis

Copy link
Copy Markdown
Contributor

I consent to the license change proposed

@grafi-tt

Copy link
Copy Markdown
Contributor

I consent to the license change proposed

@inukshuk

Copy link
Copy Markdown
Owner

I consent to the license change proposed. I also suggest we use 'The BibTeX-Ruby Maintainers' for the credits everywhere instead of my name.

@RubenVerborgh

Copy link
Copy Markdown
Contributor

I consent; thanks for doing this the proper way. I am also happy to forfeit any rights I might have on parts of the code, or to follow @inukshuk's suggestion.

@tmaier

tmaier commented Apr 22, 2022

Copy link
Copy Markdown
Collaborator Author

@inukshuk could you change it directly in this branch where you see it appropriate?

@jamesprior

Copy link
Copy Markdown
Contributor

I consent to the license change proposed

2 similar comments
@mapreal19

Copy link
Copy Markdown
Collaborator

I consent to the license change proposed

@mdave

mdave commented Apr 22, 2022

Copy link
Copy Markdown
Contributor

I consent to the license change proposed

@plessl

plessl commented Apr 22, 2022

Copy link
Copy Markdown
Contributor

I consent to the proposed license change

@teoric

teoric commented Apr 23, 2022

Copy link
Copy Markdown
Contributor

I consent to the proposed license change.

1 similar comment
@etc

etc commented Apr 24, 2022

Copy link
Copy Markdown
Contributor

I consent to the proposed license change.

@casutton

Copy link
Copy Markdown
Contributor

I consent to the license change proposed.

@ktns

ktns commented Jun 5, 2022

Copy link
Copy Markdown
Contributor

I consent to the proposed license change.

@tmaier

tmaier commented Oct 28, 2023

Copy link
Copy Markdown
Collaborator Author

I tried today to continue with the proposed license change.

I wrote direct emails to @teoric, @houshuang, @mfenner, @steffengodskesen.
I did not find an email address for @frau-sma, @retrography and @skalee.

👋 It would be great if you could also express your consent to the license change

@mfenner

mfenner commented Oct 28, 2023

Copy link
Copy Markdown

I consent to the proposed license change.

@retrography

Copy link
Copy Markdown
Contributor

You have my consent as well.

@etc

etc commented Oct 29, 2023

Copy link
Copy Markdown
Contributor

I consent to the license change proposed.

1 similar comment
@steffengodskesen

Copy link
Copy Markdown
Contributor

I consent to the license change proposed.

@teoric

teoric commented Oct 30, 2023

Copy link
Copy Markdown
Contributor

I gladly consent.

@houshuang

Copy link
Copy Markdown
Contributor

I consent.

@tmaier tmaier mentioned this pull request Jan 17, 2024
@tmaier

tmaier commented Jan 17, 2024

Copy link
Copy Markdown
Collaborator Author

Hi @frau-sma, more than 10 years ago, you contributed a rather minor change to this repository (c216241). Thank you for this. I am collecting here consents to a change of the license of this repository. I would appreciate it if you could give yours as well. Thank you and kind regards!

@tmaier
tmaier force-pushed the tmaier-dual-license branch from 9fee5a8 to 908af87 Compare November 13, 2026 23:09
Copilot AI balanced review requested due to automatic review settings November 13, 2026 23:09
@tmaier

tmaier commented Nov 13, 2026

Copy link
Copy Markdown
Collaborator Author

Hi @JLimperg and @a-fent 👋

While auditing the full git history for this license change, we found that you both contributed code to BibTeX-Ruby, but you were missing from the consent tracker above. Sorry for not reaching out earlier!

Thank you for these contributions!

We propose to license BibTeX-Ruby under GPL-3.0-or-later OR BSD-2-Clause (see the description of this PR). Since you hold the copyright to your contributions, we need your consent. If you agree, please reply here with:

I consent to the license change proposed

Please reply by 30 November 2026. If we have not heard from you by then, we will proceed without your consent: we will remove or rewrite your contributions from scratch so that the relicensed code base no longer contains them. You can of course also tell us if you object. In that case we will do the same.

Thank you and kind regards!

@tmaier tmaier changed the title Change License of gem from GPL 3.0 to dual-license GPL 3.0 and BSD-2-Clause Change License of gem from GPL 3.0 to dual-license GPL-3.0-or-later OR BSD-2-Clause Nov 13, 2026

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

Relicensing requires human verification of outstanding contributor consents, contribution provenance, de minimis assessments, and any necessary rewrites that cannot be resolved from the source snapshot.

No open issues 🎉

What changed in this PR

This PR prepares BibTeX-Ruby for dual licensing under GPL-3.0-or-later OR BSD-2-Clause, at the user's option, for future releases. It updates licensing text and package metadata without changing runtime logic.

Changes:

  • Adds the BSD 2-Clause license alongside the existing GPL text and documents the license choice.
  • Updates contributor attribution, gem metadata, and the changelog.
  • Removes GPL-only source headers and personal attribution from fixture comments.
File Description
test/​fixtures/​bibdesk.bib Removes a personal name from a fixture comment.
README.md Documents dual licensing and updates contributor credits.
LICENSE Adds the dual-license declaration and BSD terms.
lib/​bibtex/​version.rb Removes the GPL-only header.
lib/​bibtex/​value.rb Removes the GPL-only header.
lib/​bibtex/​utilities.rb Removes the GPL-only header.
lib/​bibtex/​replaceable.rb Removes the GPL-only header.
lib/​bibtex/​names.y Removes the GPL-only grammar header.
lib/​bibtex/​names.rb Removes the GPL-only header.
lib/​bibtex/​lexer.rb Removes the GPL-only header.
lib/​bibtex/​extensions.rb Removes the GPL-only header.
lib/​bibtex/​entry.rb Removes the GPL-only header.
lib/​bibtex/​elements.rb Removes the GPL-only header.
lib/​bibtex/​bibtex.y Removes the GPL-only grammar header.
lib/​bibtex/​bibliography.rb Removes the GPL-only header.
lib/​bibtex.rb Removes the GPL-only header and updates documentation metadata.
History.txt Records the dual-license change under Unreleased.
features/​entries.feature Updates the fixture comment to match the BibTeX fixture.
bibtex-ruby.gemspec Declares both licenses and updates authorship and homepage metadata.

Review effort: Balanced

@a-fent

a-fent commented Nov 14, 2026

Copy link
Copy Markdown

Thanks for checking. I consent to the licence change.

tmaier added a commit that referenced this pull request Nov 14, 2026
Frank Fischer declined consent to the license change proposed in #154
and asked for all of his changes to be rewritten. This removes what
remains of his 2011 commits ahead of an independent reimplementation:

- bfaa188: the dynamic field writer branch of Entry#method_missing and
  the matching clause in Entry#respond_to_missing?
- 8eb3979: '/' in the lexer's name, spaced_name and key patterns
  (including the key patterns, which inherited it)
- 7778f42: the body of Bibliography#save_to, which now raises
  NotImplementedError

The branch is intentionally red until the reimplementation lands:
24 minitest errors from field writers (e.g. entry.address = ...),
2 from save_to, and the cucumber scenario
features/issues/slash_keys.feature:6 (DBLP:journals/dq/RossinK99).
tmaier added a commit that referenced this pull request Nov 14, 2026
Record the lexer's token stream for every fixture and for each section
of errors.bib, under six lexer configurations, before the identifier
character set is widened (R2). Also pin the parsed results: entry
counts, keys, field names, @string names, error traces, and the
ParseError raised for errors.bib as a whole.

Refs #154
tmaier added a commit that referenced this pull request Nov 14, 2026
Cover entry.foo = value adding or replacing a field with the same value
conversion as Entry#add, respond_to? returning exactly true for Symbol
and String writer names, "=" alone not being a writer, and the existing
readers, convert_/from_ ghost methods, parent delegation, real writers
and operators staying as they are.

Refs #154
tmaier added a commit that referenced this pull request Nov 14, 2026
Exercise every example character from REQUIREMENTS.md in field names,
@string names and macro references, in strict and non-strict mode, with
and without :strip_comments. Cover % handling, @ inside a name, names
starting with a digit, multi-word field names in non-strict mode, and
keys containing / with :strip_comments and allow_missing_keys.

Add a cucumber feature with the parsing examples and a step to parse
with lexer options.

Refs #154
tmaier added a commit that referenced this pull request Nov 14, 2026
Cover writing to_s with { } as the default :quotes, honouring options,
UTF-8 output regardless of the default external encoding, round-trips
through BibTeX.open, overwriting, String and Pathname paths, returning
self, and leaving an existing file intact when serialisation raises.

Refs #154
tmaier added a commit that referenced this pull request Nov 14, 2026
Serialise the bibliography with #to_s before touching the file system,
so an exception raised while writing out an element propagates and
leaves an existing file untouched and does not create a missing one.
Values are enclosed in braces unless the caller passes a non-nil
:quotes; all other options go to #to_s unchanged, and the caller's
hash is not modified. The content is always UTF-8, independent of
Encoding.default_external, so it reads back through BibTeX.open.

A symlink is resolved first. A regular file that may be written, or a
missing one, in a writable directory is replaced atomically: the
content goes to a temporary file with a short fixed name in the same
directory, which is flushed, fsynced (skipped where fsync is not
implemented) and renamed over the target, and removed again if
anything fails, so a full disk or a crash never leaves a partial file.
The file keeps its permission bits without setuid, setgid and sticky;
a new one gets 0666 minus the umask. Everything else (a read-only file
or directory, a device, FIFO or socket, a dangling symlink) is written
directly, so the OS behaves and fails as for File.write. Both paths
write in text mode. Hard links and directory fsync are out of scope.

Refs #154
tmaier added a commit that referenced this pull request Nov 14, 2026
Entry#method_missing now treats any name of the form <field>= as a
writer for that field and stores the value through #add, so it gets the
same Value conversion as #add, #[]= and the generated writers of the
required and name fields. The writer pattern requires a field name that
does not end in '=', so :'=' (and names made only of '=') stay unknown
methods and raise NoMethodError. A wrong number of arguments raises
ArgumentError, as a real writer would.

The writer and conversion patterns are private constants shared by
method_missing and respond_to_missing?, which now uses Regexp#match? and
so answers true or false rather than a match position. Field readers
and delegation to a cross-referenced parent are unchanged.

Refs #154
tmaier added a commit that referenced this pull request Nov 14, 2026
Field names, @string names and macro references now accept what
bibtex.web's id_class allows: any printable ASCII character except
white space and " # % ' ( ) , = { }. The project's extensions stay:
non-ASCII letters and digits, and '%' unless :strip_comments makes it
start a comment.

The illegal characters are listed once; a helper derives the character
class with or without '%' (escaped, as it is spliced into a class), and
the :name and :spaced_name patterns (and their _without_percent
variants) are built from it. A name still may not start with a digit.

'@' may start a name only when it cannot start an object. Identifiers
cannot contain { ( = , } #, so the character after '@word' decides: a
name if it is = , } or # (after white space, and TeX comments when they
are stripped), an object start otherwise. This keeps error recovery
after an unterminated object, which relies on '@' starting the next
one, in strict and non-strict mode. The words of a non-strict
multi-word name use the same rule, so only the last one can start with
'@', and as before a word may start with a digit.

A word that starts with '@' ends before the next '@', so @A@b = x is
not a name (a@b and a@b@c still are). Otherwise the lookahead would be
retried from every '@' of a long run like @A@a@a... and rescan the
rest of it each time, which made lexing quadratic.

Keys accept '/' in addition to the characters accepted before; their
character list is also kept in one place and shared by the four key
patterns. All Lexer.patterns keys keep their names, and the recorded
token streams of the fixtures are unchanged.

Refs #154
tmaier added a commit that referenced this pull request Nov 14, 2026
The clean-room commits listed their changes relative to the stripped
snapshot, so some bullets described existing behaviour as new (field
writers, '/' in keys) or claimed a respond_to? change that users never
saw: Ruby already returned true or false. Keep only what changes for
users since 6.2.0.

Refs #154
tmaier added a commit that referenced this pull request Nov 14, 2026
The clean-room tests and one lexer comment referred to the requirements
document (R1-R3), which is not part of the gem, and to an issue number.
Like the rest of the suite, comments and test names now describe what
is tested; the issues stay in the commit messages and History.txt.

Refs #154
tmaier added a commit that referenced this pull request Nov 14, 2026
On Windows save_to writes in text mode, so the file has CRLF line
endings, as before. Comparing the raw bytes with to_s failed there;
reading the file back as UTF-8 text checks the encoding on every
platform, and the bytes are still checked for UTF-8 umlauts.

Refs #154
tmaier added a commit that referenced this pull request Nov 14, 2026
A mutation test of the lexer showed which regressions the suite misses.
These tests catch them directly, without a recorded token stream:

- test_error_recovery.rb takes over the errors.bib checks section by
  section, in strict and non-strict mode, and adds an unterminated
  braced value and an indented entry after free text in non-strict mode
- test_parser.rb pins how meta content between objects is kept, a TeX
  comment before the key with :strip_comments, and the rejection of
  invalid characters in entry types and of a line break or tab before
  the key's comma
- test_bibtex.rb gets the decoret and bibdesk checks it was missing, and
  test_roundtrip and test_construct are real tests again; the dead
  test_errors stub is gone

Refs #154
tmaier added a commit that referenced this pull request Nov 14, 2026
test/fixtures/lexer_tokens.json recorded the full token stream of every
fixture under six lexer settings. Two thirds of the streams were copies;
it could not be regenerated; String#inspect made it depend on the locale
for non-ASCII text; and the fixtures lack the input that the new
identifier rules affect, so it guarded less than it seemed.

Of 14 lexer mutations, the targeted tests from the previous commit
catch every one the token pins caught, and five that nothing caught
before.

Refs #154
@tmaier

tmaier commented Nov 14, 2026

Copy link
Copy Markdown
Collaborator Author

Frank Fischer replied by email this morning. He does not consent to the license change and asked for all of his changes to be rewritten. We have done that in #201: his code is removed, and the behaviour is reimplemented from a written specification, without his code. The consent tracker above is updated.

Thank you, Frank, for your quick reply and for your contributions back in 2011, and thank you to everyone who has contributed to BibTeX-Ruby over the years.

tmaier added a commit that referenced this pull request Nov 14, 2026
Remove and clean-room reimplement code without relicensing consent (#154)
@tmaier
tmaier force-pushed the tmaier-dual-license branch from 908af87 to 674ef45 Compare November 14, 2026 22:57
@tmaier
tmaier force-pushed the tmaier-dual-license branch from 674ef45 to 8730e4c Compare November 14, 2026 23:01
@inukshuk inukshuk mentioned this pull request Nov 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.